{{ define "admin/setting/index.html" }}
{{ template "admin/common/page_header.html" .}}


<div class="container-fluid p-t-15">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <header class="card-header"><div class="card-title">系统设置</div></header>
                <div class="card-body">
                    <form action="/admin/setting/doEdit" method="post" enctype="multipart/form-data">
                    <ul class="nav nav-pills mb-3">
                        <li class="nav-item">
                            <a class="nav-link active" data-toggle="tab" href="#general" aria-selected="true">通用信息</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" href="#oss" aria-selected="false">OSS云存储配置</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" href="#thumb" aria-selected="false">缩略图</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane fade show active" id="general">

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="site_title">网站标题</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="site_title" name="site_title" placeholder="请输入网站标题" value="{{.setting.SiteTitle}}">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="site_logo">网站logo</label>
                                    <div class="col-sm-10">
                                        <input type="file" name="site_logo" id="site_logo" />
                                        {{if ne .setting.SiteLogo ""}}
                                            <img style="width:80px" class="pic" src="{{.setting.SiteLogo | FormatImg}}" />
                                        {{end}}
                                    </div>

                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="site_keywords">网站关键词</label>
                                    <div class="col-sm-10">
                                        <input type="text" id="site_keywords" class="form-control" name="site_keywords"  value="{{.setting.SiteKeywords}}"/>
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="SiteDescription">网站描述</label>
                                    <div class="col-sm-10">
                                        <textarea class="form-control" name="SiteDescription" id="SiteDescription" >{{.setting.SiteDescription}}</textarea>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="no_picture">商品默认图片</label>
                                    <div class="col-sm-10">
                                        <input type="file" name="no_picture" id="no_picture" />
                                        {{if ne .setting.NoPicture ""}}
                                            <img class="pic" style="width:80px"  src="{{.setting.NoPicture  | FormatImg}}" />
                                        {{end}}
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="site_icp">备案信息</label>
                                    <div class="col-sm-10">
                                        <input class="form-control" id="site_icp" name="site_icp" value="{{.setting.SiteIcp}}"/>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="site_tel">网站电话</label>
                                    <div class="col-sm-10">
                                        <input class="form-control"  name="site_tel" id="site_tel" value="{{.setting.SiteTel}}"/>
                                    </div>

                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="search_keywords">搜索关键词</label>
                                    <div class="col-sm-10">
                                        <input class="form-control"  name="search_keywords" id="search_keywords" value="{{.setting.SearchKeywords}}"/>
                                    </div>
                                </div>

                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="TongjiCode">统计代码</label>
                                    <div class="col-sm-10">
                                        <textarea name="TongjiCode" id="TongjiCode" class="form-control" >{{.setting.TongjiCode}}</textarea>
                                    </div>
                                </div>

                        </div>
                        <div class="tab-pane fade" id="oss">
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="BucketName">BucketName</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="BucketName" name="BucketName" placeholder="请输入BucketName" value="{{.setting.BucketName}}">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="appid">AppId</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="appid" name="appid" placeholder="请设置为自己的Appid" value="{{.setting.Appid}}">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="AppSecret">AppSecret</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="AppSecret" name="AppSecret" placeholder="请设置为自己的AppSecret" value="{{.setting.AppSecret}}">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="EndPoint">AppSecret</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="EndPoint" name="EndPoint" placeholder="请输入EndPoint" value="{{.setting.EndPoint}}">
                                    </div>
                                </div>
                                <div class="form-group row">
                                    <label class="col-sm-2 control-label" for="oss_domain">OSS域名</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" id="oss_domain" name="oss_domain" placeholder="注意：域名后面需要加上：http://www.mvp.com" value="{{.setting.OssDomain}}">
                                    </div>
                                </div>

                        </div>
                        <div class="tab-pane fade" id="thumb">
                            <div class="form-group row">
                                <label class="col-sm-2 control-label" for="thumbnail_size">缩略图尺寸</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" id="thumbnail_size" name="thumbnail_size" placeholder="如：200,300,400 这样的话将会生成200x200 300x300以及400x400的图片" value="{{.setting.ThumbnailSize}}">
                                </div>
                            </div>
                        </div>
                    </div>
                        <button type="submit" class="btn btn-primary">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


{{end}}      